home *** CD-ROM | disk | FTP | other *** search
- #include <stdlib.h>
- #include <exec/types.h>
- #include <exec/ports.h>
- #include <exec/memory.h>
- #include <dos/dos.h>
- #include <clib/exec_protos.h>
- #include <clib/alib_protos.h>
- #include <stdio.h>
- #include <string.h>
- #include <intuition/intuition.h>
- #include <proto/all.h>
- #include <clib/dos_protos.h>
- #include <utility/tagitem.h>
- #include <clib/multiuser_protos.h>
- #include <libraries/Multiuser.h>
- #include <proto/multiuser.h>
-
- #include "headers/talkto_proto.h"
- #include "headers/deamon.h"
- #include "headers/Error_proto.h"
- #include "headers/global.h"
-
- BOOL Error(char *);
-
- int CXBRK(void) { return(0); }
- int chkabort(void) {return(0);}
-
- struct CurrentUser *ID;
-
- BOOL SafePutToPort(struct Message *, STRPTR);
-
- unsigned long TalkTo(User,Pass,Pass1,USERDATA)
- char *User,*Pass,*Pass1;
- unsigned long USERDATA;
- {
- struct TagItem tags[4];
- struct Library *muBase;
- ULONG rc;
-
- if (!(muBase = OpenLibrary("multiuser.library",NULL))) {
- fprintf(stderr,"cannot open multiuser.library");
- return FALSE;
- }
-
-
- tags[0].ti_Tag = muT_Global;
- tags[0].ti_Data = TRUE;
-
- tags[1].ti_Tag = muT_UserID;
- tags[1].ti_Data = (ULONG) User;
-
- tags[2].ti_Tag = muT_Password;
- tags[2].ti_Data = (ULONG) Pass;
-
- tags[3].ti_Tag = TAG_DONE;
-
- rc = muLoginA(tags);
-
- if (muBase) CloseLibrary(muBase);
- return rc;
- }
-